package com.hippy.lib.utils

import com.hippy.lib.utils.constant.RegexConstants
import java.util.regex.Pattern

object RegexUtils {
    fun isMatch(regex: String, input: CharSequence): Boolean {
        return input != null && input.isNotEmpty() && Pattern.matches(regex, input)
    }
    fun isMobileSimple(input: CharSequence): Boolean {
        return isMatch(RegexConstants.REGEX_MOBILE_SIMPLE, input)
    }
    fun isMobileExact(input: CharSequence): Boolean {
        return isMatch(RegexConstants.REGEX_MOBILE_EXACT, input)
    }
}